﻿<Page
    x:Class="vsarFlightPlan.MetadataEditor"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:vsarFlightPlan"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    xmlns:converters="using:vsarFlightPlan.Converters"
    Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
    <Page.Resources>
        <converters:DateTimeToDateTimeOffsetConverter x:Key="DateTimeToDateTimeOffset" />
        <converters:BooltoVisibilityConverter x:Key="InvertedBooltoVisibility" InvertResult="True" />
        <converters:BooltoVisibilityConverter x:Key="BooltoVisibility" />
    </Page.Resources>
    <Page.BottomAppBar>
        <CommandBar>
            <AppBarToggleButton Label="Hide This" Icon="View" />
            <AppBarButton  Label="View Online" Icon="World" />
            <AppBarButton Label="Save" Icon="Save" />
        </CommandBar>
    </Page.BottomAppBar>
    <Pivot Title="Flight Plan: Settings" Background="{StaticResource Background}">
        <Pivot.TitleTemplate>
            <DataTemplate>
                <TextBlock Text="{Binding}" Foreground="{StaticResource PrimaryColourBrush}" />
            </DataTemplate>
        </Pivot.TitleTemplate>
        <PivotItem Header="Project">
            <Grid Grid.Row="2">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <TextBlock Grid.Row="0" Text="Status" Style="{StaticResource BodyTextBlockStyle}" />
                <ComboBox Grid.Row="1"  SelectedItem="{Binding StatusString, Mode=TwoWay}" ItemsSource="{Binding DataContext.Statuses, ElementName=page}" />
                <TextBlock Grid.Row="2" Text="Scheduled"  Style="{StaticResource BodyTextBlockStyle}" />
                <DatePicker Grid.Row="3" Date="{Binding Scheduled, Mode=TwoWay}" />
                <TextBlock Grid.Row="4" Text="Scheduled Status" Style="{StaticResource BodyTextBlockStyle}" />
                <TextBox Grid.Row="5" Text="{Binding ScheduledStatus, Mode=TwoWay}" />
                <TextBlock Grid.Row="6" Text="Date Landed"  Style="{StaticResource BodyTextBlockStyle}" FontFamily="Global User Interface" />
                <DatePicker Grid.Row="7" Date="{Binding DateLandedProxy, Mode=TwoWay, Converter={StaticResource DateTimeToDateTimeOffset}}" />
                <TextBlock Grid.Row="8" Text="Version" Style="{StaticResource BodyTextBlockStyle}" />
                <TextBox Grid.Row="9" Text="{Binding Version, Mode=TwoWay}" />
                <!--<StackPanel Orientation="Horizontal" Grid.Row="16" HorizontalAlignment="Left">
                    <Button Content="Hide this item" Visibility="{Binding Hidden, Converter={StaticResource InvertedBooltoVisibility}}" Command="{Binding DataContext.ToggleHideStatus, ElementName=page}" CommandParameter="{Binding}" />
                    <Button Content="Unhide this item" Visibility="{Binding Hidden, Converter={StaticResource BooltoVisibility}}"  Command="{Binding DataContext.ToggleHideStatus, ElementName=page}" CommandParameter="{Binding}" />
                    <Button Content="View on Visual Studio Online" Command="{Binding ViewOnline}" />
                </StackPanel>
                <StackPanel Orientation="Horizontal" Grid.Row="17"  HorizontalAlignment="Right">
                    <Button Content="okay" Command="{Binding DataContext.UpdateMetadata, ElementName=page}" CommandParameter="{Binding}" />
                </StackPanel>-->
            </Grid>
        </PivotItem>
        <PivotItem Header="Team">
            <Grid Grid.Row="2">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <TextBlock Grid.Row="0" Text="Project Owner" Style="{StaticResource BodyTextBlockStyle}" />
                <TextBox Grid.Row="1" Text="{Binding ProductOwner, Mode=TwoWay}" />
                <TextBlock Grid.Row="2" Text="Project Lead"  Style="{StaticResource BodyTextBlockStyle}" />
                <TextBox Grid.Row="3" Text="{Binding ProjectLead, Mode=TwoWay}" />
                <TextBlock Grid.Row="4" Text="Ruck Master"  Style="{StaticResource BodyTextBlockStyle}" />
                <TextBox Grid.Row="5" Text="{Binding RuckMaster, Mode=TwoWay}" />
            </Grid>
        </PivotItem>
    </Pivot>
</Page>